home *** CD-ROM | disk | FTP | other *** search
/ One Click 21 (Special) / OC021.iso / Juegos / King of Skeleton / King of Skeleton.swf / scripts / DefineSprite_446 / frame_1 / DoAction.as
Encoding:
Text File  |  2006-02-02  |  518 b   |  27 lines

  1. function setupLeaf(t)
  2. {
  3.    t.xVel = Math.random() * (snowWidth * 0.5);
  4.    t.yVel = snowHeight;
  5.    t.gotoAndPlay(11 + Math.floor(Math.random() * 3));
  6.    t._yscale = Math.random() * 100;
  7.    t._xscale = Math.random() * 50;
  8. }
  9. function doLeaf(t)
  10. {
  11.    t.xVel * 0;
  12.    t._x -= t.xVel;
  13.    t.yVel += gravity;
  14.    if(t.yVel > maxGrav)
  15.    {
  16.       t.yVel = maxGrav;
  17.    }
  18.    t._y += t.yVel;
  19. }
  20. snowHeight = 0.1;
  21. snowHeightRnd = 6;
  22. snowWidth = 50;
  23. gravity = 2;
  24. maxGrav = 1.5;
  25. startShake = 81;
  26. endShake = 101;
  27.